home *** CD-ROM | disk | FTP | other *** search
- ;;; -*- Scheme -*-
-
- #|
-
- Description:
-
- This code tests string manipulation, including widening of characters
- (not sign extension) to full words.
-
- Usage:
-
- (my-string-copy "foo") -> "foo"
- (my-string-copy "supercalifragilisticoexpialidoso") -> "supercalifragilisticoexpialidoso"
-
- (test-meta-chars #\a) -> #\a
- (test-meta-chars #\M-f) -> #\M-f
-
- |#
-
- (declare (usual-integrations))
-
- ;; This tests general string
-
- (define (my-string-copy s)
- (let* ((l (string-length s))
- (new (make-string l)))
- (do ((i 0 (fix:+ 1 i)))
- ((fix:= i l) new)
- (string-set! new i (string-ref s i)))))
-
- (define (test-meta-chars c)
- (let ((string (make-string 4)))
- (string-set! string 0 c)
- (string-ref string 0)))